home *** CD-ROM | disk | FTP | other *** search
/ Hack-Mag 1 / Hack-Mag - Issue 1 (1990-08-22)(D-Tect)(PD).adf / Soundtracker-Replays / stp37c.S < prev   
Text File  |  2014-06-19  |  14KB  |  644 lines

  1. ;        AT LAST SOMEONE DID A CHANGE ON IT!
  2. ;
  3. ;            AMICOM - THE HARDWARE WIZARD
  4. ;
  5. ;                 PRESENTS
  6. ;
  7. ;        AMICOM'S FAST SOUNDTRACKER PLAYER 34
  8. ;
  9. ;              DONE IN 8-1989
  10. ;            BY THE POWER OF SPREADPOINT
  11. ;
  12. ;--------------------------------------------------------
  13.  
  14. ;@ test version showing speedtest
  15.  
  16.  
  17. ; V35 AMICOM 1989-11-29 = some minor changes
  18. ;  regs in soundinit/soundoff saved
  19. ;  illegal clr in soundoff replaced
  20. ;  status of l6int in INTENA saved/restored
  21. ; V36 AMICOM 1989-12-21 = minor change
  22. ; re-init didn't always work
  23. ; had change position of soundoff call
  24. ; V37 AMICOM 1990-03-02
  25. ; freed a5 for use in re-entrant progs
  26.  
  27.  
  28.  
  29. start:;    EXAMPLEPLAYER
  30.     lea    song,a0            ; replace with move [allocated
  31.                     ; base in chip memory],a0
  32.     lea    songptr(pc),a1
  33.     move.l    a0,(a1)            ; tell player where song is
  34.     bsr.s    timerinit        ; init timer stuff
  35.     bsr.L    soundinit        ; init and set position to start
  36. loop:
  37.     cmpi.b    #200,$dff006        ; stupid, but ok for this example
  38.     bne.s    loop
  39.     move.w    #$000f,$dff180        ;@color
  40.     bsr.L    soundplay
  41.     move.w    #0,$dff180        ;@color / don't use clr!
  42. lolo:    cmpi.b    #201,$dff006        ; yes, this must be done!
  43.     blo.s    lolo
  44.     btst    #7,$bfe001        ; restart sound on fire
  45.     bne.s    nores
  46.     bsr.L    soundinit
  47. nores:    btst    #6,$bfe001
  48.     bne.s    loop
  49.     bsr.L    soundoff        ; sound off, before timeroff!
  50.     bsr.L    timerexit        ; timer off
  51.     rts
  52.  
  53.  
  54. **********************************************************************
  55. *** Mega fast playroutine for the Spreadpoint SoundTracker V2.3-2.5 **
  56. ****  ^  gröl!! (comment from Depeche)                    **
  57. **************** Based on the playroutine from TJC *******************
  58. *********** Improved and omptimized by Unknown of D.O.C **************
  59. ***   shortened, sped up & made work on all 680X0 by Power Point    **
  60. ***     Finally repaired, pipelined and interrupt wait added by        **
  61. ***                 A M I C O M                **
  62. **********************************************************************
  63.  
  64. skip = 8                ; # lines delay for DMAoff
  65.  
  66. ;------------   Init timerA of CIAB (l6int) AMICOM 1988-01-26
  67. ; this routine does NOT work along with high-level AmigaDOS
  68. ;  applications. (Use cia.resource instead)
  69.  
  70. timerinit:                
  71.     movem.l    d1/a0-a1,-(a7)        ;
  72.     lea    timeroldIena(pc),a1    ;
  73.     move.w    $dff01c,(a1)+        ;
  74.     move.b    $bfde00,(a1)+        ; save old cr
  75.  
  76. ; find divide value of cia timer 1989-08-19 by AMICOM
  77.  
  78.     and.b    #$fe,$bfde00        ; stop timerA  CIAB
  79.     bsr.s    timeriwait        ; delay for slow cia...
  80.     bset    #4,$bfde00        ; force load
  81.     bsr.s    timeriwait        ; delay for slow cia...
  82.     move.b    $bfd500,(a1)+        ; get high
  83.     move.b    $bfd400,(a1)+        ; low byte
  84.  
  85.     move.b    #$01,$bfdd00        ; disable ciab timerA int
  86.     lea    timerl6handler(pc),a0    ;
  87.     lea    timeroldl6int(pc),a1    ;
  88.     move.l    $78.w,(a1)        ;
  89.     tst.b    $bfdd00            ; clr all requests
  90.     move.w    #$2000,$dff09c        ;
  91.     move.l    a0,$78.w        ;
  92.                     
  93.     move.w    #skip*455/10,d1        ; 227.5 cycles/line div by 5
  94.     and.b    #$c0,$bfde00        ; ciab timerA init
  95.     or.b    #$08,$bfde00        ; one shot mode
  96.     move.b    d1,$bfd400        ; low byte
  97.     lsr.w    #8,d1            ;
  98.     move.b    d1,$bfd500        ; high byte (starts timer!)
  99.     and.b    #$fe,$bfde00        ; stop it!
  100.     move.b    #$81,$bfdd00        ; allow timerA int
  101.     move.w    #$a000,$dff09a        ; allow l6 (ciab) int
  102.     movem.l    (a7)+,d1/a0-a1        ;
  103. timeriwait:                
  104.     rts                ;
  105.                     
  106.                     
  107. timerexit:                
  108.     movem.l    d0/a0,-(a7)        ;
  109.     move.w    #$2000,$dff09a        ; disable l6/ciab int
  110.     move.b    #$01,$bfdd00        ; disable ciab timerA int
  111.     and.b    #$fe,$bfde00        ; stop timera 
  112.     tst.b    $bfdd00            ; clr all requests
  113.     move.w    #$2000,$dff09c        ;
  114.     move.l    timeroldl6int(pc),$78.w    ; restore
  115.     lea    timeroldcr(pc),a0    ;
  116.     move.b    2(a0),$bfd400        ; restore old counter
  117.     move.b    1(a0),$bfd500        ; starts timer
  118.     and.b    #$fe,$bfde00        ; stop it!
  119.     move.b    (a0),d0            ;
  120.     and.b    #$0f,d0            ; only timerA bits
  121.     or.b    d0,$bfde00        ; restore cont reg
  122.     move.w    timeroldIena(pc),d0    ;
  123.     and.w    #$2000,d0        ; mask l6 status
  124.     lsl.w    #2,d0            ; to set/clr
  125.     or.w    #$2000,d0        ; only this one
  126.     move.w    d0,$dff09a        ; set/clr
  127.     move.b    #$81,$bfdd00        ; allow int on cia
  128.     movem.l    (a7)+,d0/a0        ;
  129.     rts                ;
  130.                     
  131. timeroldl6int:    dc.l    0    ; old l6 auto-vector
  132. timeroldIena:    dc.w    0    ; old status of INTENA
  133. timeroldcr:    dc.b    0    ; old status of contr reg
  134. timerolddiv:    dc.b    0,0    ; old divide counter value
  135. even
  136.  
  137. soundinit:                
  138.     movem.l    d0-d7/a0-a6,-(a7)    ;
  139.     bsr.s    soundoff        
  140.     lea    soundcounter(pc),a0    ;
  141.     clr.b    (a0)            ; ensure re-init works ok
  142.     move.l    songptr(pc),a0        
  143.     add.w    #$3b8,a0        
  144.     moveq    #$7f,d0            
  145.     moveq    #$00,d1            
  146.                     
  147. soundinit1:                
  148.     move.l    d1,d2            
  149.     subq.w    #1,d0            
  150.                     
  151. soundinit2:                
  152.     move.b    (a0)+,d1        
  153.     cmp.b    d2,d1            
  154.     bgt.s    soundinit1        
  155.     dbra    d0,soundinit2        
  156.     addq.b    #1,d2            
  157.                     
  158. soundinit3:                
  159.     move.l    songptr(pc),a0        
  160.     add.w    #42,a0            
  161.     lea    soundsample1(pc),a1    
  162.     move.l    a1,a3            
  163.     moveq    #10,d3            
  164.     asl.l    d3,d2            
  165.     lea    $438-42(a0),a4        
  166.     add.l    d2,a4            
  167.     moveq    #30,d0            
  168.     moveq    #$1e,d2            
  169.                     
  170. soundinit4:                
  171.     move.l    a4,(a3)+        
  172.     moveq    #$00,d1            
  173.     move.w    (a0),d1            
  174.     add.l    d1,d1            
  175.     add.l    d1,a4            
  176.     add.w    d2,a0            
  177.     dbra    d0,soundinit4        
  178.  
  179.     moveq    #30,d0            
  180.                     
  181. soundclear:                
  182.     move.l    (a1)+,a0        ; soundsamples
  183.     clr.l    (a0)            
  184.     dbra    d0,soundclear        
  185.  
  186.     lea    soundregdata1(pc),a0    
  187.     moveq    #31,d0            ; 8 words, 4 ch
  188.  
  189. soundclear2:                
  190.     move.w    #-1,(a0)+        ; clr register buffer
  191.     dbf    d0,soundclear2        
  192.  
  193.     bsr.L    soundsixinit         ; start & do 4 channels
  194.     movem.l    (a7)+,d0-d7/a0-a6    
  195.     rts                
  196.  
  197. soundoff:                
  198.     movem.l    a0/a1,-(a7)        ; used regs
  199.     lea    $dff0a8,a0        
  200.     move.w    #0,(a0)            ; $dff0a8, don't use clr!
  201.     move.w    #0,$10(a0)        ; $dff0b8
  202.     move.w    #0,$20(a0)        ; $dff0c8
  203.     move.w    #0,$30(a0)        ; $dff0d8
  204.     move.w    #$000f,$96-$a8(a0)    ; $dff096
  205.     lea    soundpartnrplay(pc),a0    
  206.     clr.l    (a0)            ; clr ok here!
  207.     lea    soundpartnote(pc),a0    
  208.     clr.l    (a0)            
  209.     lea    soundpartpoint(pc),a0    
  210.     clr.l    (a0)            
  211.  
  212.     lea    soundmaxpart+1(pc),a0    
  213.     move.l    songptr(pc),a1        
  214.     move.b    $3b6(a1),(a0)        
  215.     movem.l    (a7)+,a0/a1        
  216.     rts                
  217.  
  218.  
  219. soundplay:
  220.     lea    soundcounter(pc),a0
  221.     addq.b    #1,(a0)
  222.     move.b    soundcoolcounter(pc),d0
  223. soundcool:
  224.     cmp.b    (a0),d0
  225.     bne.s    soundnotsix
  226.     clr.b    (a0)
  227.     bra    soundrout2
  228.  
  229. soundnotsix:
  230.     lea    soundaud1temp(pc),a6
  231.     lea    $dff0a0,a2
  232.     moveq    #3,d7
  233. soundnotsixloop:
  234.     tst.b    3(a6)
  235.     beq.s    soundnotarprout
  236. soundarprout:
  237.     move.b    2(a6),d0
  238.     and.b    #$0f,d0
  239.     beq    soundarpegrt
  240.     subq.b    #1,d0;            1 ?
  241.     beq.s    soundportup
  242.     subq.b    #1,d0;            2 ?
  243.     beq.s    soundportdwn
  244.     subq.b    #8,d0;            $a ?
  245.     beq.s    soundvolslide
  246. soundnotarprout:
  247.     add.w    #soundaudtemplen+0,a6    ;'+0' for idiot-SEKA
  248.     add.w    #$10,a2
  249.     dbra    d7,soundnotsixloop
  250.  
  251. soundnotsix2:
  252.     lea    soundctrl0(pc),a4    ; channel counter
  253.     tst.w    (a4)            ;
  254.     beq.s    soundnotsix2_x        ;
  255.     subq.w    #1,(a4)            ;
  256.  
  257.     movem.l    soundtmpdat(pc),d1/a0/a3/a2/a6    ; get local parameters
  258.                         ; a2= soundregdata1
  259.                         ; a6= soundaud1temp
  260.     bsr    soundplayit
  261.     add.w    #$10,a2    ;        $dff0b0...
  262.     add.w    #soundaudtemplen+0,a6
  263.     lea    soundtmpdat(pc),a4
  264.     movem.l    d1/a0/a3/a2/a6,(a4)    ;
  265.  
  266. soundnotsix2_x:
  267.     rts
  268.  
  269.  
  270. soundportup:
  271.     moveq    #$00,d0
  272.     move.b    3(a6),d0
  273.     sub.w    d0,22(a6)
  274.     moveq    #124,d0        ; min. period
  275.     cmp.w    22(a6),d0    ; val <124 will cause distortion!
  276.     blo.s    soundok1
  277.     move.w    d0,22(a6)
  278. soundok1:
  279.     move.w    22(a6),6(a2)
  280.     bra.s    soundnotarprout
  281.  
  282. soundportdwn:
  283.     moveq    #$00,d0
  284.     move.b    3(a6),d0
  285.     add.w    d0,22(a6)
  286.     move.w    #1336,d0
  287.     cmp.w    22(a6),d0
  288.     bhi.s    soundok2
  289.     move.w    d0,22(a6)
  290. soundok2:
  291.     move.w    22(a6),6(a2)
  292.     bra.s    soundnotarprout
  293.  
  294. soundvolslide:
  295.     moveq    #0,d0
  296.     move.b    3(a6),d0
  297.     move.w    d0,d1
  298.     lsr.b    #4,d0
  299.     beq.s    soundvoldwn
  300.     add.w    d0,18(a6)
  301.     moveq    #64,d0
  302.     cmp.w    18(a6),d0
  303.     bhs.s    soundok3
  304.     move.w    d0,18(a6)
  305. soundok3:
  306.     move.w    18(a6),8(a2)
  307.     bra.L    soundnotarprout
  308. soundvoldwn:
  309.     and.b    #$0f,d1
  310.     sub.w    d1,18(a6)
  311.     bpl.s    soundok4
  312.     clr.w    18(a6)
  313. soundok4:
  314.     move.w    18(a6),8(a2)
  315.     bra    soundnotarprout
  316.  
  317. soundarpegrt:
  318.     move.b    soundcounter(pc),d0
  319.     subq.b    #1,d0;                1 ?
  320.     beq.s    soundloop2
  321.     subq.b    #1,d0;                2 ?
  322.     beq.s    soundloop3
  323.     subq.b    #1,d0;                3 ?
  324.     beq.s    soundloop4
  325.     subq.b    #1,d0;                4 ?
  326.     beq.s    soundloop2
  327.     subq.b    #1,d0;                5 ?
  328.     beq.s    soundloop3
  329.     bra    soundnotarprout
  330.  
  331. soundloop2:
  332.     moveq    #$00,d0
  333.     move.b    3(a6),d0
  334.     lsr.b    #4,d0
  335.     bra.s    soundcont
  336. soundloop3:
  337.     moveq    #$00,d0
  338.     move.b    3(a6),d0
  339.     and.b    #$0f,d0
  340.     bra.s    soundcont
  341. soundloop4:
  342.     move.w    16(a6),d2
  343.     bra.s    soundendpart
  344. soundcont:
  345.     add.w    d0,d0
  346.     moveq    #$00,d1
  347.     move.w    16(a6),d1
  348.     lea    soundarpeggio(pc),a0
  349. soundloop5:
  350.     move.w    (a0,d0),d2
  351.     cmp.w    (a0)+,d1
  352.     bne.s    soundloop5
  353. soundendpart:
  354.     move.w    d2,6(a2)
  355.     bra    soundnotarprout
  356.  
  357. soundrout2:
  358. soundcopyparam:                
  359.     lea    soundregdata1(pc),a4    ;
  360.     lea    $dff0a0,a2        ;
  361.     moveq    #3,d1            ; 4 channels
  362.     moveq    #-1,d6            ; to clear
  363.                     
  364. soundcopyp_2:                
  365.     move.l    (a4)+,d0        ;
  366.     bmi.s    soundnotnewptr        ;
  367.     move.l    d6,-4(a4)        ; clear it
  368.     move.l    d0,(a2)            ; ptr
  369.                     
  370. soundnotnewptr:                
  371.     addq.l    #4,a2            ; next reg
  372.  
  373.     move.w    (a4)+,d0        ;
  374.     bmi.s    soundnotnewlen        ;
  375.     move.w    d6,-2(a4)        ; clear it
  376.     move.w    d0,(a2)            ; len
  377.                     
  378. soundnotnewlen:                
  379.     addq.l    #2,a2            ; next reg
  380.                 
  381.     move.w    (a4)+,d0        ;
  382.     bmi.s    soundnotnewper        ;
  383.     move.w    d6,-2(a4)        ; clear it
  384.     move.w    d0,(a2)            ; per
  385.                     
  386. soundnotnewper:                
  387.     addq.l    #2,a2            ; next reg
  388.     move.w    (a4)+,d0        ;
  389.     bmi.s    soundnotnewvol        ;
  390.     move.w    d6,-2(a4)        ;
  391.     move.w    d0,(a2)            ; vol
  392.                     
  393. soundnotnewvol:                
  394.     addq.l    #6,a4            ; next data set
  395.     addq.l    #8,a2            ; next reg. set
  396.                     
  397.     dbf    d1,soundcopyp_2        ;
  398.  
  399.     move.w    sounddmacon(pc),$dff096    ;
  400.  
  401.     or.b    #1,$bfde00        ; start ciab timerA
  402.     rts                ;
  403.                     
  404. timerl6handler:                
  405.     move.w    #$0f0f,$dff180            ;@color
  406.     movem.l    d0/d1/d6/d7/a0/a2-a6,-(a7)    ; used registers only!
  407.     bsr.s    soundwaitcont            ; do delayed routine
  408.     tst.b    $bfdd00                ; clr cia int req
  409.     move.w    #$2000,$dff09c            ; clr int req
  410.     movem.l    (a7)+,d0/d1/d6/d7/a0/a2-a6    ;
  411.     move.w    #$0000,$dff180            ;@color
  412.     rte                    ;
  413.                     
  414. soundwaitcont:
  415.     move.w    #$8000,d0
  416.     or.w    sounddmacon(pc),d0
  417.  
  418.     lea    $dff0d0,a2
  419.     move.w    d0,$96-$d0(a2);            $dff096
  420.     lea    soundaud4temp(pc),a6
  421.     moveq    #$10,d6
  422.     moveq    #1,d1
  423.     moveq    #3,d7
  424. soundvoiceloop:
  425.     cmp.w    14(a6),d1
  426.     bne.s    soundnextvoice
  427.     move.l    10(a6),(a2);            $dff0d0
  428.     move.w    d1,4(a2);            $dff0d4 ,len
  429. soundnextvoice:
  430.     sub.w    #soundaudtemplen+0,a6
  431.     sub.l    d6,a2;                #$10
  432.     dbra    d7,soundvoiceloop
  433.     lea    soundpartnote(pc),a0
  434.     move.l    (a0),d0
  435.     add.l    d6,d0;                #$10
  436.     move.l    d0,(a0);            soundpartnote
  437.     cmp.l    #$400,d0
  438.     bne.s    soundstop
  439. soundhigher:
  440.     clr.l    (a0);                soundpartnote
  441.     lea    soundpartnrplay(pc),a3
  442.     addq.l    #1,(a3);            soundpartnrplay
  443.     moveq    #$00,d0
  444.     move.w    soundmaxpart(pc),d0
  445.     move.l    (a3),d1;            soundpartnrplay
  446.     cmp.l    d0,d1
  447.     bne.s    soundstop
  448.     clr.l    (a3);                soundpartnrplay
  449.  
  450. soundstop:
  451.     lea    soundstatus(pc),a4
  452.     tst.w    (a4)
  453.     beq.s    soundstop2
  454.     clr.w    (a4)
  455.     bra.s    soundhigher
  456. soundstop2:
  457.  
  458. soundsixinit:
  459.     move.l    songptr(pc),a0
  460.     add.w    #$43c,a0
  461.     lea    $c-$43c(a0),a3
  462.     lea    $3b8-$43c(a0),a4
  463.     move.l    soundpartnrplay(pc),d0
  464.     moveq    #$00,d1
  465.     move.b    (a4,d0),d1
  466.     moveq    #10,d6
  467.     asl.l    d6,d1
  468.     add.l    soundpartnote(pc),d1
  469.     lea    soundpartpoint(pc),a4
  470.     move.l    d1,(a4)
  471.     lea    sounddmacon(pc),a4
  472.     clr.w    (a4)
  473.     lea    soundregdata1(pc),a2    ; dff0a0
  474.     lea    soundaud1temp(pc),a6
  475.     lea    soundtmpdat(pc),a4
  476.     movem.l    d1/a0/a3/a2/a6,(a4)    ; store local data
  477.     lea    soundctrl0(pc),a4    ;  for playit
  478.     move.w    #4,(a4)            ; 4 channels to do
  479.     rts
  480.  
  481.  
  482. soundplayit:
  483.     move.l    (a0,d1),(a6)
  484.     addq.l    #4,d1
  485.     moveq    #$00,d2
  486.     move.b    2(a6),d2
  487.     lsr.b    #4,d2
  488.     beq.s    soundnosamplechange
  489.  
  490.     lea    soundsamples(pc),a1
  491.     move.l    d2,d4
  492.     add.w    d2,d2
  493.     lsl.w    #5,d4;
  494.     sub.w    d2,d4;        =    mulu    #$1e,d4
  495.     add.w    d2,d2
  496.     moveq    #$00,d3
  497.     move.l    (a1,d2),4(a6)
  498.     move.w    (a3,d4),8(a6)
  499.     move.w    2(a3,d4),18(a6)
  500.     move.w    4(a3,d4),d3
  501.     beq.s    sounddisplace
  502.     move.l    4(a6),d2
  503.     add.l    d3,d2
  504.     move.l    d2,4(a6)
  505.     move.l    d2,10(a6)
  506.     move.w    6(a3,d4),8(a6)
  507.     move.w    6(a3,d4),14(a6)
  508.     move.w    18(a6),8(a2)
  509.     bra.s    soundnosamplechange
  510.  
  511. sounddisplace:
  512.     move.l    4(a6),d2
  513. ;    add.l    d3,d2;            What the hell? (Power Point)
  514.     move.l    d2,10(a6)
  515.     move.w    6(a3,d4),14(a6)
  516.     move.w    18(a6),8(a2)
  517. soundnosamplechange:
  518.     tst.w    (a6)
  519.     beq.s    soundretrout
  520.     move.w    (a6),16(a6)
  521.     move.l    4(a6),(a2)
  522.     move.w    8(a6),4(a2)
  523.     move.w    (a6),6(a2)
  524.     lea    sounddmacon(pc),a4
  525.     move.w    20(a6),d0
  526.     or.w    d0,(a4)
  527.  
  528. soundretrout:
  529.     tst.w    (a6)
  530.     beq.s    soundnonewper
  531.     move.w    (a6),22(a6)
  532.  
  533. soundnonewper:
  534.     lea    soundstatus(pc),a4
  535.     move.b    2(a6),d0
  536.     and.b    #$0f,d0
  537.     sub.b    #11,d0;            11 ?
  538.     beq.s    soundposjmp
  539.     subq.b    #1,d0;            12 ?
  540.     beq.s    soundsetvol
  541.     subq.b    #1,d0;            13 ?
  542.     beq.s    soundbreak
  543.     subq.b    #1,d0;            14 ?
  544.     beq.s    soundsetfil
  545.     subq.b    #1,d0;            15 ?
  546.     beq.s    soundsetspeed
  547.     rts
  548.  
  549. soundposjmp:
  550.     not.w    (a4);            soundstatus
  551.     moveq    #$00,d0
  552.     move.b    3(a6),d0
  553.     subq.b    #1,d0
  554.     lea    soundpartnrplay(pc),a4
  555.     move.l    d0,(a4)
  556.     rts
  557.  
  558. soundsetvol:
  559.     moveq    #0,d0
  560.     move.b    3(a6),d0
  561.     move.w    d0,8(a2)
  562.     rts
  563.  
  564. soundbreak:
  565.     not.w    (a4);            soundstatus
  566.     rts
  567.  
  568. soundsetfil:
  569.     lea    $bfe001,a4
  570.     move.b    3(a6),d0
  571.     btst    #0,3(a6)
  572.     bne.s    filteron
  573. filteroff:
  574.     bclr    #1,(a4)
  575.     rts
  576. filteron:
  577.     bset    #1,(a4)
  578.     rts
  579.  
  580. soundsetspeed:
  581.     move.b    3(a6),d0
  582.     and.b    #$0f,d0
  583.     beq.s    soundback
  584. ;    lea    soundcounter(pc),a4 ;    what !!? (AMICOM)
  585. ;    clr.b    (a4) ;            
  586.     lea    soundcoolcounter(pc),a4
  587.     move.b    d0,(a4)
  588. soundback:
  589.     rts
  590.  
  591. soundaud1temp:
  592.             blk.w    10,0
  593.             dc.w    $0001
  594.             blk.w    2,0
  595. soundaud2temp:
  596.             blk.w    10,0
  597.             dc.w    $0002
  598.             blk.w    2,0
  599. soundaud3temp:
  600.             blk.w    10,0
  601.             dc.w    $0004
  602.             blk.w    2,0
  603. soundaud4temp:
  604.             blk.w    10,0
  605.             dc.w    $0008
  606.             blk.w    2,0
  607. soundaudtemplen=soundaud2temp-soundaud1temp
  608.  
  609. soundpartnote:        dc.l    0
  610. soundpartnrplay:    dc.l    0
  611. soundpartpoint:        dc.l    0
  612. soundsamples:        dc.l    0
  613. soundsample1:        blk.l    31,0
  614. soundmaxpart:        dc.w    $0000
  615. sounddmacon:        dc.w    $0000
  616. soundstatus:        dc.w    $0000
  617.  
  618. soundregdata1:        blk.w    8,-1    ; dff0a0
  619.             blk.w    8,-1
  620.             blk.w    8,-1
  621. soundregdata4:        blk.w    8,-1    ; dff0d0
  622.  
  623. soundctrl0:        dc.w    0    ; no channel to treat now
  624. soundtmpdat:        blk.l    5,0
  625. songptr:        dc.l    0    ; pointer to song data
  626.                     ; must be set by main prog!
  627. soundcounter:        dc.b    0
  628. soundcoolcounter:    dc.b    6
  629.  
  630. soundarpeggio:
  631.     dc.w $0358,$0328,$02fa,$02d0,$02a6,$0280,$025c
  632.     dc.w $023a,$021a,$01fc,$01e0,$01c5,$01ac,$0194,$017d
  633.     dc.w $0168,$0153,$0140,$012e,$011d,$010d,$00fe,$00f0
  634.     dc.w $00e2,$00d6,$00ca,$00be,$00b4,$00aa,$00a0,$0097
  635.     dc.w $008f,$0087,$007f,$0078,$0071,$0000,$0000,$0000
  636.  
  637. ;----------------------------------------------------------
  638.  
  639. ; copy this data to CHIP memory or place it into
  640. ; a DATA:CHIP hunk section
  641.  
  642. song:
  643. ;blk.w    97552/2,0
  644.